package cn.dancepeak.artcle.service;

import cn.dancepeak.article.domain.Article;
import cn.dancepeak.article.query.ArticleQuery;
import cn.dancepeak.vo.ArticleTypeDateNumVo;
import cn.dancepeak.vo.ArticleTypeNameNumVo;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface IArticleServiceImpl {

    void add(Article article);

    void update(Article article);

    void delete(Long id);

    void deleteByList(List<Long> ids);

    Article getById(Long id);

    PageInfo<Article> page(ArticleQuery articleQuery);

    List<ArticleTypeNameNumVo> getArticleTypeNameNum();

    List<ArticleTypeDateNumVo> getArticleTypeDateNum();

    List<Article> getRelevant(Long id, String articleTag);
    List<Article> getArticleByTypeName(String articleName);

    List<Article> getArticleNameAndArticleStarNum();

    Map<String, Integer> getArticleTagAndArticleReadSum();

    void updateReadAddOne(Long id);
}
